//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Developer, DeveloperResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooDeveloperList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<DeveloperResponse>(`/uctoo/developer/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooDeveloper = async (id: string) => {
  return requestClient.get<Developer>(`/uctoo/developer/${id}`);
};

export const adductooDeveloper = async (data: Partial<Developer>) => {
  return requestClient.post<Developer>('/uctoo/developer/add', data);
};

export const edituctooDeveloper = async (data: Partial<Developer>) => {
  return requestClient.post<Developer>('/uctoo/developer/edit', data);
};

export const deleteuctooDeveloper = async (id: string) => {
  return requestClient.post<any>('/uctoo/developer/del', { id });
};
